﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using ThoiTrang.Business;
using ThoiTrang.Entities;

public partial class user_favarticles : System.Web.UI.Page
{
    public a_ArticleCollection arts;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!SessionManager.IsLogged)
            Response.Redirect("login.aspx?ckid=" + SessionManager.GetCookie(), true);
        if (Request["a"] != null)
        {
            switch (Request["a"])
            {
                case "del":
                    a_FavoriteService.Deletea_FavoriteArtBySSID(int.Parse(Request["fid"]), SessionManager.GetCookie());
                    InfoText.Visible = true;
                    break;
                default: break;
            }
        }
        int total;
        int page = Request["cp"] == null ? 1 : int.Parse(Request["cp"]);
        arts = a_ArticleService.a_Articles_selListFavBySSID(SessionManager.GetCookie(), a_ArticleColumns.ID, ThoiTrang.Data.OrderDirection.DESC, page, 18, out total);
        hplPager.Total = total;
    }
}
